package com.uchiha.nova.core.model.dto;

import cn.hutool.core.date.DatePattern;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 租户账户 模型DTO
 *
 * @author magic
 */
@Data
@Schema(description = " 租户账户 模型DTO")
@JsonIgnoreProperties(ignoreUnknown = true)
public class TenantDTO implements Serializable {

	private static final long serialVersionUID = 1L;
    @Schema(description = "主键id,自动生成")
    private Long id;
	/**
	 * 租户id
	 */
    @Schema(description = "租户id")
	private String tenant;
	/**
	 * 租户名称
	 */
    @Schema(description = "租户名称")
	private String tenantName;
	/**
	 * 域名地址
	 */
    @Schema(description = "域名地址")
	private String domain;
	/**
	 * 系统背景
	 */
    @Schema(description = "系统背景")
	private String backgroundUrl;
	/**
	 * 联系人
	 */
    @Schema(description = "联系人")
	private String linkman;
	/**
	 * 联系电话
	 */
    @Schema(description = "联系电话")
	private String contactNumber;
	/**
	 * 联系地址
	 */
    @Schema(description = "联系地址")
	private String address;
	/**
	 * 失效日期
	 */
    @Schema(description = "失效日期")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN, timezone = "GMT+8")
	@JsonDeserialize(using = LocalDateTimeDeserializer.class)
	@JsonSerialize(using = LocalDateTimeSerializer.class)
	private LocalDateTime expireTime;
	/**
	 * 数据源
	 */
    @Schema(description = "数据源")
	private String datasourceId;
	/**
	 * 授权码
	 */
    @Schema(description = "授权码")
	private String licenseKey;
	/**
	 * 备注
	 */
    @Schema(description = "备注")
	private String remark;
	/**
	 * 排序字段
	 */
    @Schema(description = "排序字段")
	private Integer sort;
	/**
	 * 所属租户
	 */
    @Schema(description = "所属租户")
	private String tenantId;
	/**
	 * 所属公司
	 */
    @Schema(description = "所属公司")
	private Long companyId;
	/**
	 * 所属部门
	 */
    @Schema(description = "所属部门")
	private Long deptId;
	/**
	 * 岗位
	 */
    @Schema(description = "岗位")
	private Long postId;

	private Integer status;
}
